const contents = document.querySelectorAll('.content')
const listItems = document.querySelectorAll('nav ul li')

listItems.forEach((item, idx) => {
    item.onclick = () => {
        for (let index = 0; index < listItems.length; index++) {
            contents[index].classList.remove('show')
            listItems[index].classList.remove('active')
        }

        contents[idx].classList.add('show')
        item.classList.add('active')
    }
})